/* create a java SimpleDateFormat instance for entry~setPublishedDate */
DATE_PARSER = .bsf~new("java.text.SimpleDateFormat", "yyyy-MM-dd")
datum = date()
parse var datum day mounth year
if mounth="Dec" then mounth=12
if mounth="Jan" then mounth=01
if mounth="Feb" then mounth=01 /* simply add the necessary once */
datum_new = year"-"mounth"-"day
say "Todays date: " datum_new
feed=.bsf~new("com.sun.syndication.feed.synd.SyndFeedImpl")
/* using syndfeedImpl to creat a feed using the independent object model */
feed~setFeedType(typet)
feed~setTitle("This is a simple Sample")
feed~setDescription(desc)
feed~setAuthor("Martin Stoppacher")
feed~setLink("http://martinstoppacher.com")
feed~setLanguage("English")
/* creates a Java array list for the entries of the feed*/
entries =.bsf~new("java.util.ArrayList")
entry =.bsf~new("com.sun.syndication.feed.synd.SyndEntryImpl")
/* create a independent description content implemetation */
description=.bsf~new("com.sun.syndication.feed.synd.SyndContentImpl")
description~setType("text/plain")
description~setValue("ROME Web Page")
entry~setDescription(description)
/* add the description object to the entry object */
/* create a new category; by adding the SyndCategoryImpl to a Java array */
/* object and this array object to the entry object */
cat =.bsf~new("java.util.ArrayList")
category=.bsf~new("com.sun.syndication.feed.synd.SyndCategoryImpl")
category~setName("Java")
category~setTaxonomyUri("https://rome.dev.java.net/")
cat~add(category)
entry~setCategories(cat)
/* add the entry to the Java entries array object */
entries~add(entry)
feed~setEntries(entries)
/* sets the Java array as entries of the feed */